<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<title>std::ranges::iota_view&lt;W, Bound&gt;::iterator - cppreference.com</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../../../common/favicon.ico">
<link rel="stylesheet" href="../../../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-css:7:472787eddcf4605d11de8c7ef047234f */</style>

<script src="../../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"cpp/ranges/iota_view/iterator","wgTitle":"cpp/ranges/iota view/iterator","wgCurRevisionId":134168,"wgArticleId":19987,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"cpp/ranges/iota_view/iterator","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-ColiruCompiler":1,"gadget-MathJax":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-js:7:9f05c6caceb9bb1a482b6cebd4c5a330 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<style type="text/css">/*<![CDATA[*/
.source-cpp {line-height: normal;}
.source-cpp li, .source-cpp pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for cpp
 * CSS class: source-cpp, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.cpp.source-cpp .de1, .cpp.source-cpp .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.cpp.source-cpp  {font-family:monospace;}
.cpp.source-cpp .imp {font-weight: bold; color: red;}
.cpp.source-cpp li, .cpp.source-cpp .li1 {font-weight: normal; vertical-align:top;}
.cpp.source-cpp .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.cpp.source-cpp .li2 {font-weight: bold; vertical-align:top;}
.cpp.source-cpp .kw1 {color: #0000dd;}
.cpp.source-cpp .kw2 {color: #0000ff;}
.cpp.source-cpp .kw3 {color: #0000dd;}
.cpp.source-cpp .kw4 {color: #0000ff;}
.cpp.source-cpp .co1 {color: #909090;}
.cpp.source-cpp .co2 {color: #339900;}
.cpp.source-cpp .coMULTI {color: #ff0000; font-style: italic;}
.cpp.source-cpp .es0 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es1 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es2 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es3 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es4 {color: #008000; font-weight: bold;}
.cpp.source-cpp .es5 {color: #008000; font-weight: bold;}
.cpp.source-cpp .br0 {color: #008000;}
.cpp.source-cpp .sy0 {color: #008000;}
.cpp.source-cpp .sy1 {color: #000080;}
.cpp.source-cpp .sy2 {color: #000040;}
.cpp.source-cpp .sy3 {color: #000040;}
.cpp.source-cpp .sy4 {color: #008080;}
.cpp.source-cpp .st0 {color: #008000;}
.cpp.source-cpp .nu0 {color: #000080;}
.cpp.source-cpp .nu6 {color: #000080;}
.cpp.source-cpp .nu8 {color: #000080;}
.cpp.source-cpp .nu12 {color: #000080;}
.cpp.source-cpp .nu16 {color:#000080;}
.cpp.source-cpp .nu17 {color:#000080;}
.cpp.source-cpp .nu18 {color:#000080;}
.cpp.source-cpp .nu19 {color:#000080;}
.cpp.source-cpp .ln-xtra, .cpp.source-cpp li.ln-xtra, .cpp.source-cpp div.ln-xtra {background-color: #ffc;}
.cpp.source-cpp span.xtra { display:block; }

/*]]>*/
</style><!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-cpp_ranges_iota_view_iterator skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading"><span style="font-size:0.7em; line-height:130%">std::ranges::</span><span style="font-size:0.7em; line-height:130%">iota_view&lt;W, Bound&gt;::</span><i>iterator</i></h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">From cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../../../cpp.html" title="cpp">cpp</a>‎ | <a href="../../ranges.html" title="cpp/ranges">ranges</a>‎ | <a href="../iota_view.html" title="cpp/ranges/iota view">iota view</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../../../cpp.html" title="cpp"> C++</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em;">
<tr class="t-nv"><td colspan="5"> <a href="../../compiler_support.html" title="cpp/compiler support"> Compiler support</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../freestanding.html" title="cpp/freestanding"> Freestanding and hosted</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../language.html" title="cpp/language"> Language</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../header.html" title="cpp/header"> Standard library headers</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../named_req.html" title="cpp/named req"> Named requirements </a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../feature_test.html" title="cpp/feature test"> Feature test macros </a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../utility.html#Language_support" title="cpp/utility"> Language support library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../concepts.html" title="cpp/concepts"> Concepts library</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../meta.html" title="cpp/meta"> Metaprogramming library</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../error.html" title="cpp/error"> Diagnostics library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../utility.html" title="cpp/utility"> General utilities library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../string.html" title="cpp/string"> Strings library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../container.html" title="cpp/container"> Containers library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../iterator.html" title="cpp/iterator"> Iterators library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../ranges.html" title="cpp/ranges"> Ranges library</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../algorithm.html" title="cpp/algorithm"> Algorithms library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../numeric.html" title="cpp/numeric"> Numerics library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../locale.html" title="cpp/locale"> Localizations library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../io.html" title="cpp/io"> Input/output library</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../filesystem.html" title="cpp/filesystem"> Filesystem library</a> <span class="t-mark-rev t-since-cxx17">(C++17)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../regex.html" title="cpp/regex"> Regular expressions library</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../thread.html" title="cpp/thread"> Concurrency support library</a> <span class="t-mark-rev t-since-cxx11">(C++11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../experimental.html" title="cpp/experimental"> Technical specifications</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../symbol_index.html" title="cpp/symbol index"> Symbols index</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="../../links/libs.html" title="cpp/links/libs"> External libraries</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../../ranges.html" title="cpp/ranges"> Ranges library</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_access" title="cpp/ranges">Range access</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../begin.html" title="cpp/ranges/begin"><span class="t-lines"><span>begin</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../cbegin.html" title="cpp/ranges/cbegin"><span class="t-lines"><span>cbegin</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../end.html" title="cpp/ranges/end"><span class="t-lines"><span>end</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../cend.html" title="cpp/ranges/cend"><span class="t-lines"><span>cend</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../rbegin.html" title="cpp/ranges/rbegin"><span class="t-lines"><span>rbegin</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../crbegin.html" title="cpp/ranges/crbegin"><span class="t-lines"><span>crbegin</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../rend.html" title="cpp/ranges/rend"><span class="t-lines"><span>rend</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../crend.html" title="cpp/ranges/crend"><span class="t-lines"><span>crend</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../size.html" title="cpp/ranges/size"><span class="t-lines"><span>size</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../ssize.html" title="cpp/ranges/ssize"><span class="t-lines"><span>ssize</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../data.html" title="cpp/ranges/data"><span class="t-lines"><span>data</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../cdata.html" title="cpp/ranges/cdata"><span class="t-lines"><span>cdata</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../empty.html" title="cpp/ranges/empty"><span class="t-lines"><span>empty</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_conversions" title="cpp/ranges">Range conversions</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../to.html" title="cpp/ranges/to"><span class="t-lines"><span>to</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_primitives" title="cpp/ranges">Range primitives</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>range_size_t</span><span>range_difference_t</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>range_value_t</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>range_reference_t</span><span>range_const_reference_t</span><span>range_rvalue_reference_t</span></span></a></div><div><span class="t-lines"><span>  </span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iterator_t.html" title="cpp/ranges/iterator t"><span class="t-lines"><span>iterator_t</span><span>const_iterator_t</span><span>sentinel_t</span></span></a></div><div><span class="t-lines"><span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Dangling_iterator_handling" title="cpp/ranges">Dangling iterator handling</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../dangling.html" title="cpp/ranges/dangling"><span class="t-lines"><span>dangling</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../borrowed_iterator_t.html" title="cpp/ranges/borrowed iterator t"><span class="t-lines"><span>borrowed_iterator_t</span></span></a></div><div><span class="t-lines"><span>  </span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../borrowed_iterator_t.html" title="cpp/ranges/borrowed iterator t"><span class="t-lines"><span>borrowed_subrange_t</span></span></a></div><div><span class="t-lines"><span>  </span></span></div></div></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_concepts" title="cpp/ranges">Range concepts</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../range.html" title="cpp/ranges/range"><span class="t-lines"><span>range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../borrowed_range.html" title="cpp/ranges/borrowed range"><span class="t-lines"><span>borrowed_range</span></span></a></div><div><span class="t-lines"><span>  </span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../sized_range.html" title="cpp/ranges/sized range"><span class="t-lines"><span>sized_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../constant_range.html" title="cpp/ranges/constant range"><span class="t-lines"><span>constant_range</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../common_range.html" title="cpp/ranges/common range"><span class="t-lines"><span>common_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../view.html" title="cpp/ranges/view"><span class="t-lines"><span>view</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../viewable_range.html" title="cpp/ranges/viewable range"><span class="t-lines"><span>viewable_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../input_range.html" title="cpp/ranges/input range"><span class="t-lines"><span>input_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../output_range.html" title="cpp/ranges/output range"><span class="t-lines"><span>output_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../forward_range.html" title="cpp/ranges/forward range"><span class="t-lines"><span>forward_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../bidirectional_range.html" title="cpp/ranges/bidirectional range"><span class="t-lines"><span>bidirectional_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../random_access_range.html" title="cpp/ranges/random access range"><span class="t-lines"><span>random_access_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../contiguous_range.html" title="cpp/ranges/contiguous range"><span class="t-lines"><span>contiguous_range</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Views" title="cpp/ranges">Views</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../view_interface.html" title="cpp/ranges/view interface"><span class="t-lines"><span>view_interface</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../subrange.html" title="cpp/ranges/subrange"><span class="t-lines"><span>subrange</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_factories" title="cpp/ranges">Factories</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../empty_view.html" title="cpp/ranges/empty view"><span class="t-lines"><span>empty_view</span><span>views::empty</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iota_view.html" title="cpp/ranges/iota view"><span class="t-lines"><span>iota_view</span><span>views::iota</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../single_view.html" title="cpp/ranges/single view"><span class="t-lines"><span>single_view</span><span>views::single</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../basic_istream_view.html" title="cpp/ranges/basic istream view"><span class="t-lines"><span>basic_istream_view</span><span>views::istream</span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/repeat_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/repeat view (page does not exist)"><span class="t-lines"><span>repeat_view</span><span>views::repeat</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_adaptors" title="cpp/ranges">Adaptors</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../ref_view.html" title="cpp/ranges/ref view"><span class="t-lines"><span>ref_view</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../all_view.html" title="cpp/ranges/all view"><span class="t-lines"><span>views::all_t</span><span>views::all</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../common_view.html" title="cpp/ranges/common view"><span class="t-lines"><span>common_view</span><span>views::common</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../owning_view.html" title="cpp/ranges/owning view"><span class="t-lines"><span>owning_view</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../view_counted.html" title="cpp/ranges/view counted"><span class="t-lines"><span>views::counted</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../reverse_view.html" title="cpp/ranges/reverse view"><span class="t-lines"><span>reverse_view</span><span>views::reverse</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../zip_view.html" title="cpp/ranges/zip view"><span class="t-lines"><span>zip_view</span><span>views::zip</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../as_const_view.html" title="cpp/ranges/as const view"><span class="t-lines"><span>as_const_view</span><span>views::as_const</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../as_rvalue_view.html" title="cpp/ranges/as rvalue view"><span class="t-lines"><span>as_rvalue_view</span><span>views::as_rvalue</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span>  </span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../take_view.html" title="cpp/ranges/take view"><span class="t-lines"><span>take_view</span><span>views::take</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../take_while_view.html" title="cpp/ranges/take while view"><span class="t-lines"><span>take_while_view</span><span>views::take_while</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../drop_view.html" title="cpp/ranges/drop view"><span class="t-lines"><span>drop_view</span><span>views::drop</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../drop_while_view.html" title="cpp/ranges/drop while view"><span class="t-lines"><span>drop_while_view</span><span>views::drop_while</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../zip_transform_view.html" title="cpp/ranges/zip transform view"><span class="t-lines"><span>zip_transform_view</span><span>views::zip_transform</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/adjacent_transform_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/adjacent transform view (page does not exist)"><span class="t-lines"><span>adjacent_transform_view</span><span>views::adjacent_transform</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span>  </span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/cartesian_product_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/cartesian product view (page does not exist)"><span class="t-lines"><span>cartesian_product_view</span><span>views::cartesian_product</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../elements_view.html" title="cpp/ranges/elements view"><span class="t-lines"><span>elements_view</span><span>views::elements</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../keys_view.html" title="cpp/ranges/keys view"><span class="t-lines"><span>keys_view</span><span>views::keys</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../values_view.html" title="cpp/ranges/values view"><span class="t-lines"><span>values_view</span><span>views::values</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../transform_view.html" title="cpp/ranges/transform view"><span class="t-lines"><span>transform_view</span><span>views::transform</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/adjacent_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/adjacent view (page does not exist)"><span class="t-lines"><span>adjacent_view</span><span>views::adjacent</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/slide_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/slide view (page does not exist)"><span class="t-lines"><span>slide_view</span><span>views::slide</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/stride_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/stride view (page does not exist)"><span class="t-lines"><span>stride_view</span><span>views::stride</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"> <br>
</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../filter_view.html" title="cpp/ranges/filter view"><span class="t-lines"><span>filter_view</span><span>views::filter</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../join_view.html" title="cpp/ranges/join view"><span class="t-lines"><span>join_view</span><span>views::join</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../split_view.html" title="cpp/ranges/split view"><span class="t-lines"><span>split_view</span><span>views::split</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../lazy_split_view.html" title="cpp/ranges/lazy split view"><span class="t-lines"><span>lazy_split_view</span><span>views::lazy_split</span></span></a></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../join_with_view.html" title="cpp/ranges/join with view"><span class="t-lines"><span>join_with_view</span><span>views::join_with</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/chunk_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/chunk view (page does not exist)"><span class="t-lines"><span>chunk_view</span><span>views::chunk</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/chunk_by_view&amp;action=edit&amp;redlink=1" class="new" title="cpp/ranges/chunk by view (page does not exist)"><span class="t-lines"><span>chunk_by_view</span><span>views::chunk_by</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span><span><span class="t-mark-rev t-since-cxx23">(C++23)</span></span></span></div></div></td></tr>
</table></div></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_adaptor_objects" title="cpp/ranges">Range adaptor objects</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Range_adaptor_closure_objects" title="cpp/ranges">Range adaptor closure objects</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="../../ranges.html#Helper_concepts" title="cpp/ranges">Helper items</a></td></tr>
<tr class="t-nv-col-table"><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../copyable_wrapper.html" title="cpp/ranges/copyable wrapper"><span class="t-lines"><span><i>copyable-box</i></span></span></a></div></div></td></tr>
</table></div></td><td><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../../ranges.html#Helper_concepts" title="cpp/ranges"><span class="t-lines"><span><i>simple-view</i></span></span></a></div></div></td></tr>
</table></div></td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../iota_view.html" title="cpp/ranges/iota view"><tt>std::ranges::iota_view</tt></a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="">
<tr class="t-nv-h1"><td colspan="5"> Member functions</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iota_view.html" title="cpp/ranges/iota view"><span class="t-lines"><span>iota_view::iota_view</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iota_view.html" title="cpp/ranges/iota view"><span class="t-lines"><span>iota_view::begin</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iota_view.html" title="cpp/ranges/iota view"><span class="t-lines"><span>iota_view::end</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="../iota_view.html" title="cpp/ranges/iota view"><span class="t-lines"><span>iota_view::size</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> <a href="../iota_view.html#Deduction_guides" title="cpp/ranges/iota view">Deduction guides</a> <span class="t-mark-rev t-since-cxx20">(C++20)</span> </td></tr>
<tr class="t-nv-h1"><td colspan="5"> Helper concepts</td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span><i>decrementable</i></span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span><i>advanceable</i></span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> <strong class="selflink">Iterator</strong></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view::<i>iterator</i>::<i>iterator</i></span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view::<i>iterator</i>::operator*</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view::<i>iterator</i>::operator[]</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view::<i>iterator</i>::operator++<br>iota_view::<i>iterator</i>::operator++(int)</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view::<i>iterator</i>::operator--<br>iota_view::<i>iterator</i>::operator--(int)</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view::<i>iterator</i>::operator+=</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>iota_view::<i>iterator</i>::operator-=</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>operator==(iota_view::<i>iterator</i>)<br>operator&lt;(iota_view::<i>iterator</i>)<br>operator&gt;(iota_view::<i>iterator</i>)<br>operator&lt;=(iota_view::<i>iterator</i>)<br>operator&gt;=(iota_view::<i>iterator</i>)<br>operator&lt;=&gt;(iota_view::<i>iterator</i>)</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>operator+(iota_view::<i>iterator</i>)</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><strong class="selflink"><span class="t-lines"><span>operator-(iota_view::<i>iterator</i>)</span></span></strong></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv-h1"><td colspan="5"> <a href="sentinel.html" title="cpp/ranges/iota view/sentinel">Sentinel</a></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="sentinel.html" title="cpp/ranges/iota view/sentinel"><span class="t-lines"><span>iota_view::<i>sentinel</i>::<i>sentinel</i></span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="sentinel.html" title="cpp/ranges/iota view/sentinel"><span class="t-lines"><span>operator==(iota_view::<i>iterator</i>,iota_view::<i>sentinel</i>)</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
<tr class="t-nv"><td colspan="5"><div class="t-nv-ln-table"><div><a href="sentinel.html" title="cpp/ranges/iota view/sentinel"><span class="t-lines"><span>operator-(iota_view::<i>iterator</i>,iota_view::<i>sentinel</i>)</span></span></a></div><div><span class="t-lines"><span><span class="t-mark-rev t-since-cxx20">(C++20)</span></span></span></div></div></td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">struct</span> <span class="coMULTI">/*iterator*/</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-h">
<td> <div>Helper alias templates</div></td>
<td></td>
<td></td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> I <span class="sy1">&gt;</span><br>
<span class="kw1">using</span> <span class="coMULTI">/*iota-diff-t*/</span> <span class="sy1">=</span> <span class="coMULTI">/* see below */</span><span class="sy4">;</span>  <span class="co1">// exposition only</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-h">
<td> <div>Helper concepts</div></td>
<td></td>
<td></td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> I <span class="sy1">&gt;</span><br>
<p>concept <span class="coMULTI">/*decrementable*/</span> <span class="sy1">=</span>               <span class="co1">// exposition only</span><br>
  <a href="../../iterator/incrementable.html"><span class="kw2863">std::<span class="me2">incrementable</span></span></a><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span> requires<span class="br0">(</span>I i<span class="br0">)</span> <span class="br0">{</span><br>
    <span class="br0">{</span> <span class="sy2">--</span>i <span class="br0">}</span> <span class="sy2">-</span><span class="sy1">&gt;</span> <a href="../../concepts/same_as.html"><span class="kw2936">std::<span class="me2">same_as</span></span></a><span class="sy1">&lt;</span>I<span class="sy3">&amp;</span><span class="sy1">&gt;</span><span class="sy4">;</span><br>
    <span class="br0">{</span> i<span class="sy2">--</span> <span class="br0">}</span> <span class="sy2">-</span><span class="sy1">&gt;</span> <a href="../../concepts/same_as.html"><span class="kw2936">std::<span class="me2">same_as</span></span></a><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span><span class="sy4">;</span><br>
</p>
  <span class="br0">}</span><span class="sy4">;</span></span></div></td>
<td> (3) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">template</span><span class="sy1">&lt;</span> <span class="kw1">class</span> I <span class="sy1">&gt;</span><br>
<p>concept <span class="coMULTI">/*advanceable*/</span> <span class="sy1">=</span>                 <span class="co1">// exposition only</span><br>
  <span class="coMULTI">/*decrementable*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span> <a href="../../concepts/totally_ordered.html"><span class="kw2955">std::<span class="me2">totally_ordered</span></span></a><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span><br>
  requires<span class="br0">(</span>I i, <span class="kw4">const</span> I j, <span class="kw4">const</span> <span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span> n<span class="br0">)</span> <span class="br0">{</span><br>
    <span class="br0">{</span> i <span class="sy2">+</span><span class="sy1">=</span> n <span class="br0">}</span> <span class="sy2">-</span><span class="sy1">&gt;</span> <a href="../../concepts/same_as.html"><span class="kw2936">std::<span class="me2">same_as</span></span></a><span class="sy1">&lt;</span>I<span class="sy3">&amp;</span><span class="sy1">&gt;</span><span class="sy4">;</span><br>
    <span class="br0">{</span> i <span class="sy2">-</span><span class="sy1">=</span> n <span class="br0">}</span> <span class="sy2">-</span><span class="sy1">&gt;</span> <a href="../../concepts/same_as.html"><span class="kw2936">std::<span class="me2">same_as</span></span></a><span class="sy1">&lt;</span>I<span class="sy3">&amp;</span><span class="sy1">&gt;</span><span class="sy4">;</span><br>
    I<span class="br0">(</span>j <span class="sy2">+</span> n<span class="br0">)</span><span class="sy4">;</span><br>
    I<span class="br0">(</span>n <span class="sy2">+</span> j<span class="br0">)</span><span class="sy4">;</span><br>
    I<span class="br0">(</span>j <span class="sy2">-</span> n<span class="br0">)</span><span class="sy4">;</span><br>
    <span class="br0">{</span> j <span class="sy2">-</span> j <span class="br0">}</span> <span class="sy2">-</span><span class="sy1">&gt;</span> <a href="../../concepts/convertible_to.html"><span class="kw2938">std::<span class="me2">convertible_to</span></span></a><span class="sy1">&lt;</span><span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;&gt;</span><span class="sy4">;</span><br>
</p>
  <span class="br0">}</span><span class="sy4">;</span></span></div></td>
<td> (4) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> The return type of <a href="../iota_view.html" title="cpp/ranges/iota view"><tt>iota_view::begin</tt></a>. The name of this class (shown here as <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iterator*/</span></span></span>) is unspecified.</div>
<div class="t-li1"><span class="t-li">2)</span> The exposition-only alias template <code><i>iota-diff-t</i></code> calculates the difference type for both iterator types and <a href="../../iterator/weakly_incrementable.html#Integer-like_types" title="cpp/iterator/weakly incrementable">integer-like types</a>.
<ul><li> If <code>W</code> is not an integral type, or if it is an integral type and <span class="t-c"><span class="mw-geshi cpp source-cpp">sizeof<span class="br0">(</span><a href="../../iterator/iter_t.html"><span class="kw2878">std::<span class="me2">iter_difference_t</span></span></a><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span><span class="br0">)</span></span></span> is greater than <span class="t-c"><span class="mw-geshi cpp source-cpp">sizeof<span class="br0">(</span>I<span class="br0">)</span></span></span>, then <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span></span></span> is <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../iterator/iter_t.html"><span class="kw2878">std::<span class="me2">iter_difference_t</span></span></a><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span></span></span>.
</li><li> Otherwise, <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span></span></span> is a signed integer type of width greater than the width of <code>I</code> if such a type exists.
</li><li> Otherwise, <code>I</code> is one of the widest integral types, and <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span></span></span> is an unspecified <a href="../../iterator/weakly_incrementable.html#Integer-like_types" title="cpp/iterator/weakly incrementable">signed-integer-like type</a> of width not less than the width of <code>I</code>. It is unspecified whether <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span></span></span> models <a href="../../iterator/weakly_incrementable.html" title="cpp/iterator/weakly incrementable"><code>weakly_incrementable</code></a> in this case.</li></ul></div>

<div class="t-li1"><span class="t-li">3)</span> The exposition-only concept <code><i>decrementable</i></code> specifies that a type is <a href="../../iterator/incrementable.html" title="cpp/iterator/incrementable"><code>incrementable</code></a>, and pre- and post- <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">--</span></span></span> for the type have common meaning.</div>
<div class="t-li1"><span class="t-li">4)</span> The exposition-only concept <code><i>advanceable</i></code> specifies that a type is both <code><i>decrementable</i></code> and <a href="../../concepts/totally_ordered.html" title="cpp/concepts/totally ordered"><code>totally_ordered</code></a>, and <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">+</span><span class="sy1">=</span></span></span>, <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">-</span><span class="sy1">=</span></span></span>, <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">+</span></span></span>, and <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">-</span></span></span> among the type and its different type have common meaning.</div>
<h3><span class="mw-headline" id="Semantic_requirements">Semantic requirements</span></h3>
<div class="t-li1"><span class="t-li">3)</span> Type <code>I</code> models <code><i>decrementable</i></code> only if <code>I</code> satisfies <code><i>decrementable</i></code> and all concepts it subsumes are modeled, and given equal objects <code>a</code> and <code>b</code> of type <code>I</code>:
<ul><li> If <code>a</code> and <code>b</code> are in the domain of both pre- and post- <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">--</span></span></span> (i.e. they are decrementable), then the following are all <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw2">true</span></span></span>:
<ul><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../memory/addressof.html"><span class="kw758">std::<span class="me2">addressof</span></span></a><span class="br0">(</span><span class="sy2">--</span>a<span class="br0">)</span> <span class="sy1">==</span> <a href="../../memory/addressof.html"><span class="kw758">std::<span class="me2">addressof</span></span></a><span class="br0">(</span>a<span class="br0">)</span></span></span>,
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">bool</span><span class="br0">(</span>a<span class="sy2">--</span> <span class="sy1">==</span> b<span class="br0">)</span></span></span>,
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">bool</span><span class="br0">(</span><span class="br0">(</span><span class="br0">(</span><span class="kw4">void</span><span class="br0">)</span>a<span class="sy2">--</span>, a<span class="br0">)</span> <span class="sy1">==</span> <span class="sy2">--</span>b<span class="br0">)</span></span></span>,
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">bool</span><span class="br0">(</span><span class="sy2">++</span><span class="br0">(</span><span class="sy2">--</span>a<span class="br0">)</span> <span class="sy1">==</span> b<span class="br0">)</span></span></span>.
</li></ul>
</li><li> If <code>a</code> and <code>b</code> are are in the domain of both pre- and post- <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">++</span></span></span> (i.e. they are incrementable), then <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">bool</span><span class="br0">(</span><span class="sy2">--</span><span class="br0">(</span><span class="sy2">++</span>a<span class="br0">)</span> <span class="sy1">==</span> b<span class="br0">)</span></span></span> is <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw2">true</span></span></span>.</li></ul></div>

<div class="t-li1"><span class="t-li">4)</span> Let <code>D</code> denote <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>I<span class="sy1">&gt;</span></span></span>. Type <code>I</code> models <code><i>advanceable</i></code> only if <code>I</code> satisfies <code><i>advanceable</i></code> and all concepts it subsumes are modeled, and given
<ul><li> objects <code>a</code> and <code>b</code> of type <code>I</code> and 
</li><li> value <code>n</code> of type <code>D</code>,
</li></ul>
<p>such that <code>b</code> is reachable from <code>a</code> after <code>n</code> applications of <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">++</span>a</span></span>, all following conditions are satisfied:
</p>
<ul><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="br0">(</span>a <span class="sy2">+</span><span class="sy1">=</span> n<span class="br0">)</span></span></span> is equal to <code>b</code>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../memory/addressof.html"><span class="kw758">std::<span class="me2">addressof</span></span></a><span class="br0">(</span>a <span class="sy2">+</span><span class="sy1">=</span> n<span class="br0">)</span></span></span> is equal to <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../memory/addressof.html"><span class="kw758">std::<span class="me2">addressof</span></span></a><span class="br0">(</span>a<span class="br0">)</span></span></span>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>a <span class="sy2">+</span> n<span class="br0">)</span></span></span> is equal to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="br0">(</span>a <span class="sy2">+</span><span class="sy1">=</span> n<span class="br0">)</span></span></span>.
</li><li> For any two positive values <code>x</code> and <code>y</code> of type <code>D</code>, if <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>a <span class="sy2">+</span> D<span class="br0">(</span>x <span class="sy2">+</span> y<span class="br0">)</span><span class="br0">)</span></span></span> is well-defined, then <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>a <span class="sy2">+</span> D<span class="br0">(</span>x <span class="sy2">+</span> y<span class="br0">)</span><span class="br0">)</span></span></span> is equal to <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>I<span class="br0">(</span>a <span class="sy2">+</span> x<span class="br0">)</span> <span class="sy2">+</span> y<span class="br0">)</span></span></span>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>a <span class="sy2">+</span> D<span class="br0">(</span><span class="nu0">0</span><span class="br0">)</span><span class="br0">)</span></span></span> is equal to <code>a</code>.
</li><li> If <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>a <span class="sy2">+</span> D<span class="br0">(</span>n <span class="sy2">-</span> <span class="nu0">1</span><span class="br0">)</span><span class="br0">)</span></span></span> is well-defined, then <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>a <span class="sy2">+</span> n<span class="br0">)</span></span></span> is equal to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="br0">[</span><span class="br0">]</span><span class="br0">(</span>I c<span class="br0">)</span> <span class="br0">{</span> <span class="kw1">return</span> <span class="sy2">++</span>c<span class="sy4">;</span> <span class="br0">}</span><span class="br0">(</span>I<span class="br0">(</span>a <span class="sy2">+</span> D<span class="br0">(</span>n <span class="sy2">-</span> <span class="nu0">1</span><span class="br0">)</span><span class="br0">)</span><span class="br0">)</span></span></span>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="br0">(</span>b <span class="sy2">+</span><span class="sy1">=</span> <span class="sy2">-</span>n<span class="br0">)</span></span></span> is equal to <code>a</code>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="br0">(</span>b <span class="sy2">-</span><span class="sy1">=</span> n<span class="br0">)</span></span></span> is equal to <code>a</code>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../memory/addressof.html"><span class="kw758">std::<span class="me2">addressof</span></span></a><span class="br0">(</span>b <span class="sy2">-</span><span class="sy1">=</span> n<span class="br0">)</span></span></span> is equal to <span class="t-c"><span class="mw-geshi cpp source-cpp"><a href="../../memory/addressof.html"><span class="kw758">std::<span class="me2">addressof</span></span></a><span class="br0">(</span>b<span class="br0">)</span></span></span>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp">I<span class="br0">(</span>b <span class="sy2">-</span> n<span class="br0">)</span></span></span> is equal to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="br0">(</span>b <span class="sy2">-</span><span class="sy1">=</span> n<span class="br0">)</span></span></span>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp">D<span class="br0">(</span>b <span class="sy2">-</span> a<span class="br0">)</span></span></span> is equal to <code>n</code>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp">D<span class="br0">(</span>a <span class="sy2">-</span> b<span class="br0">)</span></span></span> is equal to <span class="t-c"><span class="mw-geshi cpp source-cpp">D<span class="br0">(</span><span class="sy2">-</span>n<span class="br0">)</span></span></span>.
</li><li> <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">bool</span><span class="br0">(</span>a <span class="sy1">&lt;=</span> b<span class="br0">)</span></span></span> is <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw2">true</span></span></span>.</li></ul></div>

<h3><span class="mw-headline" id="Member_types">Member types</span></h3>
<table class="t-dsc-begin">

<tr class="t-dsc-hitem">
<td>  Member type
</td>
<td>  Definition
</td></tr>


<tr class="t-dsc">
<td>  <code>iterator_concept</code>
</td>
<td>  <span class="t-lc"><a href="../../iterator/iterator_tags.html" title="cpp/iterator/iterator tags">std::random_access_iterator_tag</a></span> if <code>W</code> models <code><i>advanceable</i></code>.<br>Otherwise, <span class="t-lc"><a href="../../iterator/iterator_tags.html" title="cpp/iterator/iterator tags">std::bidirectional_iterator_tag</a></span> if <code>W</code> models <code><i>decrementable</i></code>.<br>Otherise, <span class="t-lc"><a href="../../iterator/iterator_tags.html" title="cpp/iterator/iterator tags">std::forward_iterator_tag</a></span> if <code>W</code> models <a href="../../iterator/incrementable.html" title="cpp/iterator/incrementable"><code>incrementable</code></a>.<br>Otherwise, <span class="t-lc"><a href="../../iterator/iterator_tags.html" title="cpp/iterator/iterator tags">std::input_iterator_tag</a></span>.
</td></tr>


<tr class="t-dsc">
<td>  <code>iterator_category</code>
</td>
<td>  <span class="t-lc"><a href="../../iterator/iterator_tags.html" title="cpp/iterator/iterator tags">std::input_iterator_tag</a></span> if <code>W</code> models <a href="../../iterator/incrementable.html" title="cpp/iterator/incrementable"><code>incrementable</code></a>.<br>Otherwise, there is no member type <code>iterator_category</code>.
</td></tr>


<tr class="t-dsc">
<td>  <code>value_type</code>
</td>
<td>  <code>W</code>
</td></tr>


<tr class="t-dsc">
<td>  <code>difference_type</code>
</td>
<td>  <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iota-diff-t*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span></span></span>
</td></tr>

</table>
<p>Notes: <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iterator*/</span></span></span> is
</p>
<ul><li> a <a href="../../iterator/random_access_iterator.html" title="cpp/iterator/random access iterator"><code>random_access_iterator</code></a> if <span class="t-c"><span class="mw-geshi cpp source-cpp">W</span></span> models <code><i>advanceable</i></code>,
</li><li> a <a href="../../iterator/bidirectional_iterator.html" title="cpp/iterator/bidirectional iterator"><code>bidirectional_iterator</code></a> if <span class="t-c"><span class="mw-geshi cpp source-cpp">W</span></span> models <code><i>decrementable</i></code>,
</li><li> a <a href="../../iterator/forward_iterator.html" title="cpp/iterator/forward iterator"><code>forward_iterator</code></a> if <span class="t-c"><span class="mw-geshi cpp source-cpp">W</span></span> models <a href="../../iterator/incrementable.html" title="cpp/iterator/incrementable"><code>incrementable</code></a>, and
</li><li> an <a href="../../iterator/input_iterator.html" title="cpp/iterator/input iterator"><code>input_iterator</code></a> otherwise.
</li></ul>
<p>However, it only satisfies <a href="../../named_req/InputIterator.html" title="cpp/named req/InputIterator"><span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">LegacyInputIterator</span></a> if <code>W</code> models <a href="../../iterator/incrementable.html" title="cpp/iterator/incrementable"><code>incrementable</code></a>, and does not satisfy <a href="../../named_req/InputIterator.html" title="cpp/named req/InputIterator"><span style="font-family: Georgia, 'DejaVu Serif', serif; font-style:italic">LegacyInputIterator</span></a> otherwise.
</p>
<h3><span class="mw-headline" id="Data_members">Data members</span></h3>
<p>Typical implementation of this iterator type holds one data member of type <code>W</code> (shown here as <span class="t-c"><span class="mw-geshi cpp source-cpp">value_</span></span>): the value used for dereferencing.
</p>
<h3><span class="mw-headline" id="Member_functions">Member functions</span></h3>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::iterator"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::<i>iterator</i>::</span><i>iterator</i></span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="coMULTI">/*iterator*/</span><span class="br0">(</span><span class="br0">)</span> requires <a href="../../concepts/default_initializable.html"><span class="kw2950">std::<span class="me2">default_initializable</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span> <span class="sy1">=</span> <span class="kw1">default</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="kw1">explicit</span> <span class="coMULTI">/*iterator*/</span><span class="br0">(</span> W value <span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> Value initializes the exposition-only data member <code>value_</code> via its default member initializer (<span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy1">=</span> W<span class="br0">(</span><span class="br0">)</span></span></span>).</div>
<div class="t-li1"><span class="t-li">2)</span> Initializes the exposition-only data member <code>value_</code> with <code>value</code>. This value will be returned by <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">*</span></span></span> and incremented by <span class="t-c"><span class="mw-geshi cpp source-cpp">operator<span class="sy2">++</span></span></span>.
</div></div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator.2A"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::<i>iterator</i>::</span>operator*</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> W operator<span class="sy2">*</span><span class="br0">(</span><span class="br0">)</span> <span class="kw4">const</span><br>
    <span class="kw1">noexcept</span><span class="br0">(</span><a href="../../types/is_copy_constructible.html"><span class="kw543">std::<span class="me2">is_nothrow_copy_constructible_v</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="br0">)</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>Returns the current value, by value (in other words, this is a read-only view).
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator.2B.2B"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::<i>iterator</i>::</span>operator++</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> operator<span class="sy2">++</span><span class="br0">(</span><span class="br0">)</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="kw4">void</span> operator<span class="sy2">++</span><span class="br0">(</span><span class="kw4">int</span><span class="br0">)</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span> operator<span class="sy2">++</span><span class="br0">(</span><span class="kw4">int</span><span class="br0">)</span> requires <a href="../../iterator/incrementable.html"><span class="kw2863">std::<span class="me2">incrementable</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (3) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">++</span>value_<span class="sy4">;</span> <span class="kw1">return</span> <span class="sy2">*</span>this<span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">2)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">++</span>value_<span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">3)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">auto</span> tmp <span class="sy1">=</span> <span class="sy2">*</span>this<span class="sy4">;</span> <span class="sy2">++</span>value_<span class="sy4">;</span> <span class="kw1">return</span> tmp<span class="sy4">;</span></span></span>.
</div></div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator--"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::<i>iterator</i>::</span>operator--</span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> operator<span class="sy2">--</span><span class="br0">(</span><span class="br0">)</span> requires <span class="coMULTI">/*decrementable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span>operator<span class="sy2">--</span><span class="br0">(</span><span class="kw4">int</span><span class="br0">)</span> requires <span class="coMULTI">/*decrementable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">--</span>value_<span class="sy4">;</span> <span class="kw1">return</span> <span class="sy2">*</span>this<span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">2)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw4">auto</span> tmp <span class="sy1">=</span> <span class="sy2">*</span>this<span class="sy4">;</span> <span class="sy2">--</span>value_<span class="sy4">;</span> <span class="kw1">return</span> tmp<span class="sy4">;</span></span></span>.
</div></div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator.2B.3D"><span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::<i>iterator</i>::</span>operator+=</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> operator<span class="sy2">+</span><span class="sy1">=</span><span class="br0">(</span> difference_type n <span class="br0">)</span><br>
    requires <span class="coMULTI">/*advanceable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>If <code>W</code> is unsigned-integer-like, performs <span class="t-c"><span class="mw-geshi cpp source-cpp">value_ <span class="sy2">+</span><span class="sy1">=</span> <span class="kw1">static_cast</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="br0">(</span>n<span class="br0">)</span></span></span> if <code>n</code> is non-negative, <span class="t-c"><span class="mw-geshi cpp source-cpp">value <span class="sy2">-</span><span class="sy1">=</span> <span class="kw1">static_cast</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="br0">(</span><span class="sy2">-</span>n<span class="br0">)</span></span></span> otherwise, and then returns <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span>.
</p><p>Otherwise, equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp">value_ <span class="sy2">+</span><span class="sy1">=</span> n<span class="sy4">;</span> <span class="kw1">return</span> <span class="sy2">*</span>this<span class="sy4">;</span></span></span>.
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator-.3D"><span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::<i>iterator</i>::</span>operator-=</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> operator<span class="sy2">-</span><span class="sy1">=</span><span class="br0">(</span> difference_type n <span class="br0">)</span><br>
    requires <span class="coMULTI">/*advanceable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>If <code>W</code> is unsigned-integer-like, performs <span class="t-c"><span class="mw-geshi cpp source-cpp">value_ <span class="sy2">-</span><span class="sy1">=</span> <span class="kw1">static_cast</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="br0">(</span>n<span class="br0">)</span></span></span> if <code>n</code> is non-negative, or <span class="t-c"><span class="mw-geshi cpp source-cpp">value <span class="sy2">+</span><span class="sy1">=</span> <span class="kw1">static_cast</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="br0">(</span><span class="sy2">-</span>n<span class="br0">)</span></span></span> otherwise, and then returns <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="sy2">*</span>this</span></span>.
</p><p>Otherwise, equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp">value_ <span class="sy2">-</span><span class="sy1">=</span> n<span class="sy4">;</span> <span class="kw1">return</span> <span class="sy2">*</span>this<span class="sy4">;</span></span></span>.
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="std::ranges::iota_view::iterator::operator.5B.5D"> <span style="font-size:0.7em; line-height:130%">std::ranges::iota_view::<i>iterator</i>::</span>operator[]</span></h2>
<table class="t-dcl-begin"><tbody>

<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw4">constexpr</span> W operator<span class="br0">[</span><span class="br0">]</span><span class="br0">(</span> difference_type n <span class="br0">)</span> <span class="kw4">const</span><br>
    requires <span class="coMULTI">/*advanceable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td class="t-dcl-nopad">  </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> W<span class="br0">(</span>value_ <span class="sy2">+</span> n<span class="br0">)</span><span class="sy4">;</span></span></span>.
</p>
</div>
<h3><span class="mw-headline" id="Non-member_functions">Non-member functions</span></h3>
<div class="t-member">
<h2> <span class="mw-headline" id="operator.3D.3D.2C_.3C.2C_.3E.2C_.3C.3D.2C_.3E.3D.2C_.3C.3D.3E.28std::ranges::iota_view::iterator.29">operator==, &lt;, &gt;, &lt;=, &gt;=, &lt;=&gt;<small>(std::ranges::iota_view::<i>iterator</i>)</small></span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">==</span> <span class="br0">(</span><span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> x, <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> y<span class="br0">)</span><br>
    requires <a href="../../concepts/equality_comparable.html"><span class="kw2953">std::<span class="me2">equality_comparable</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">&lt;</span>  <span class="br0">(</span><span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> x, <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> y<span class="br0">)</span><br>
    requires <a href="../../concepts/totally_ordered.html"><span class="kw2955">std::<span class="me2">totally_ordered</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">&gt;</span>  <span class="br0">(</span><span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> x, <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> y<span class="br0">)</span><br>
    requires <a href="../../concepts/totally_ordered.html"><span class="kw2955">std::<span class="me2">totally_ordered</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (3) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">&lt;=</span> <span class="br0">(</span><span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> x, <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> y<span class="br0">)</span><br>
    requires <a href="../../concepts/totally_ordered.html"><span class="kw2955">std::<span class="me2">totally_ordered</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (4) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">&gt;=</span> <span class="br0">(</span><span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> x, <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> y<span class="br0">)</span><br>
    requires <a href="../../concepts/totally_ordered.html"><span class="kw2955">std::<span class="me2">totally_ordered</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (5) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="kw4">bool</span> operator<span class="sy1">&lt;=&gt;</span><span class="br0">(</span><span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> x, <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> y<span class="br0">)</span><br>
    requires <a href="../../concepts/totally_ordered.html"><span class="kw2955">std::<span class="me2">totally_ordered</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span> <span class="sy3">&amp;&amp;</span> <a href="../../utility/compare/three_way_comparable.html"><span class="kw3173">std::<span class="me2">three_way_comparable</span></span></a><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (6) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> x.<span class="me1">value_</span> <span class="sy1">==</span> y.<span class="me1">value_</span><span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">2)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> x.<span class="me1">value_</span> <span class="sy1">&lt;</span> y.<span class="me1">value_</span><span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">3)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> y <span class="sy1">&lt;</span> x<span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">4)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> <span class="sy3">!</span><span class="br0">(</span>y <span class="sy1">&lt;</span> x<span class="br0">)</span><span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">5)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> <span class="sy3">!</span><span class="br0">(</span>x <span class="sy1">&lt;</span> y<span class="br0">)</span><span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">6)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> x.<span class="me1">value_</span> <span class="sy1">&lt;=&gt;</span> y.<span class="me1">value_</span><span class="sy4">;</span></span></span>.</div>
<p>The <code>!=</code> operator is <a href="../../language/operators.html#Relational_operators" title="cpp/language/operators">synthesized</a> from  <code>operator==</code>.
</p><p>These functions are not visible to ordinary <a href="../../language/unqualified_lookup.html" title="cpp/language/unqualified lookup">unqualified</a> or <a href="../../language/qualified_lookup.html" title="cpp/language/qualified lookup">qualified lookup</a>, and can only be found by <a href="../../language/adl.html" title="cpp/language/adl">argument-dependent lookup</a> when <code><i>iterator</i></code> is an associated class of the arguments.
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="operator.2B.28std::ranges::iota_view::iterator.29">operator+<small>(std::ranges::iota_view::<i>iterator</i>)</small></span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span> operator<span class="sy2">+</span><span class="br0">(</span> <span class="coMULTI">/*iterator*/</span> i, difference_type n <span class="br0">)</span><br>
    requires <span class="coMULTI">/*advanceable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span> operator<span class="sy2">+</span><span class="br0">(</span> difference_type n, <span class="coMULTI">/*iterator*/</span> i <span class="br0">)</span><br>
    requires <span class="coMULTI">/*advanceable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<p>Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp">i <span class="sy2">+</span><span class="sy1">=</span> n<span class="sy4">;</span> <span class="kw1">return</span> i<span class="sy4">;</span></span></span>.
</p><p>These functions are not visible to ordinary <a href="../../language/unqualified_lookup.html" title="cpp/language/unqualified lookup">unqualified</a> or <a href="../../language/qualified_lookup.html" title="cpp/language/qualified lookup">qualified lookup</a>, and can only be found by <a href="../../language/adl.html" title="cpp/language/adl">argument-dependent lookup</a> when <code><i>iterator</i></code> is an associated class of the arguments.
</p>
</div>
<div class="t-member">
<h2> <span class="mw-headline" id="operator-.28std::ranges::iota_view::iterator.29">operator-<small>(std::ranges::iota_view::<i>iterator</i>)</small></span></h2>
<table class="t-dcl-begin"><tbody>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> <span class="coMULTI">/*iterator*/</span> operator<span class="sy2">-</span><span class="br0">(</span> <span class="coMULTI">/*iterator*/</span> i, difference_type n <span class="br0">)</span><br>
    requires <span class="coMULTI">/*advanceable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (1) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl t-since-cxx20">
<td> <div><span class="mw-geshi cpp source-cpp"><span class="kw1">friend</span> <span class="kw4">constexpr</span> difference_type operator<span class="sy2">-</span><span class="br0">(</span> <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> x,<br>
<p>                                            <span class="kw4">const</span> <span class="coMULTI">/*iterator*/</span><span class="sy3">&amp;</span> y <span class="br0">)</span><br>
</p>
    requires <span class="coMULTI">/*advanceable*/</span><span class="sy1">&lt;</span>W<span class="sy1">&gt;</span><span class="sy4">;</span></span></div></td>
<td> (2) </td>
<td> <span class="t-mark-rev t-since-cxx20">(since C++20)</span> </td>
</tr>
<tr class="t-dcl-sep"><td></td><td></td><td></td></tr>
</tbody></table>
<div class="t-li1"><span class="t-li">1)</span> Equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp">i <span class="sy2">-</span><span class="sy1">=</span> n<span class="sy4">;</span> <span class="kw1">return</span> i<span class="sy4">;</span></span></span>.</div>
<div class="t-li1"><span class="t-li">2)</span> Let <code>D</code> be <code>difference_type</code>.
<ul><li> If <code>W</code> is signed-integer-like, equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> D<span class="br0">(</span>D<span class="br0">(</span>x.<span class="me1">value_</span><span class="br0">)</span> <span class="sy2">-</span> D<span class="br0">(</span>y.<span class="me1">value_</span><span class="br0">)</span><span class="br0">)</span><span class="sy4">;</span></span></span>.
</li><li> Otherwise, if <code>W</code> is unsigned-integer-like, equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> y.<span class="me1">value_</span> <span class="sy1">&gt;</span> x.<span class="me1">value_</span> <span class="sy4">?</span> D<span class="br0">(</span><span class="sy2">-</span>D<span class="br0">(</span>y.<span class="me1">value_</span> <span class="sy2">-</span> x.<span class="me1">value_</span><span class="br0">)</span><span class="br0">)</span> <span class="sy4">:</span> D<span class="br0">(</span>x.<span class="me1">value_</span> <span class="sy2">-</span> y.<span class="me1">value_</span><span class="br0">)</span><span class="sy4">;</span></span></span>.
</li><li> Otherwise, equivalent to <span class="t-c"><span class="mw-geshi cpp source-cpp"><span class="kw1">return</span> x.<span class="me1">value_</span> <span class="sy2">-</span> y.<span class="me1">value_</span><span class="sy4">;</span></span></span>.</li></ul></div>

<p>These functions are not visible to ordinary <a href="../../language/unqualified_lookup.html" title="cpp/language/unqualified lookup">unqualified</a> or <a href="../../language/qualified_lookup.html" title="cpp/language/qualified lookup">qualified lookup</a>, and can only be found by <a href="../../language/adl.html" title="cpp/language/adl">argument-dependent lookup</a> when <code><i>iterator</i></code> is an associated class of the arguments.
</p>
</div>
<h3><span class="mw-headline" id="Defect_reports">Defect reports</span></h3>
<p>The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
</p>
<table class="dsctable" style="font-size:0.8em">
<tr>
<th> DR
</th>
<th> Applied to
</th>
<th> Behavior as published
</th>
<th> Correct behavior
</th></tr>
<tr>
<td> <a rel="nofollow" class="external text" href="https://wg21.link/P2259R1">P2259R1</a>
</td>
<td> C++20
</td>
<td> member <code>iterator_category</code> is always defined
</td>
<td> defined only if <code>W</code> satisfies <a href="../../iterator/incrementable.html" title="cpp/iterator/incrementable"><code>incrementable</code></a>
</td></tr>
<tr>
<td> <a rel="nofollow" class="external text" href="https://cplusplus.github.io/LWG/issue3580">LWG 3580</a>
</td>
<td> C++20
</td>
<td> bodies of <code>operator+</code> and <code>operator-</code> rule out <a href="../../language/return.html#Automatic_move_from_local_variables_and_parameters" title="cpp/language/return">implicit move</a>
</td>
<td> made suitable for implicit move
</td></tr></table>

<!-- 
NewPP limit report
Preprocessor visited node count: 14145/1000000
Preprocessor generated node count: 15413/1000000
Post‐expand include size: 296274/2097152 bytes
Template argument size: 69447/2097152 bytes
Highest expansion depth: 17/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_en_:pcache:idhash:19987-0!*!0!!en!*!* and timestamp 20220730113944 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    Retrieved from "<a href="https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/iota_view/iterator&amp;oldid=134168">https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/iota_view/iterator&amp;oldid=134168</a>"                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>Navigation</h5>
            <ul><li><a href="https://en.cppreference.com/w/cpp/ranges/iota_view/iterator">Online version</a></li><li>Offline version retrieved 2022-07-30 14:05.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> This page was last modified on 6 October 2021, at 11:24.</li>
                                    <li id="footer-info-viewcount">This page has been accessed 2,817 times.</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.ColiruCompiler","ext.gadget.MathJax"], null, true);
}</script>
<script src="../../../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 8.219 secs. -->
	</body>
<!-- Cached 20220730113944 -->
</html>